package com.firmboy.big;

import org.junit.Test;

import java.io.*;

/**
 * 读取大文件
 *
 * @author firmboy
 * @create 2018-04-28 下午3:04
 **/
public class ReadBigFile {

    @Test
    public void readBigFile() throws IOException {
        String path = "/firmboy/workspace/test/test.db";
        BufferedReader bfr = new BufferedReader(new FileReader(new File(path)));
        String s = "";
        long l = 0L;
        while((s = bfr.readLine())!=null){
            l++;
            System.out.println(l+":"+s);
        }

    }

}
